package com.qfoud.edu.framwork.container;

import com.qfoud.edu.framwork.stragy.base.ParameterTypeStragy;
import com.qfoud.edu.framwork.stragy.impl.*;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author xiaobobo
 * @title: ParameterStragyContainer
 * @projectName cd-java-2303-project-parent
 * @description: 这个是装的是参数策略的这样一个容器
 * @date 2023/5/10  15:35
 */
public class ParameterStragyContainer {

    //这个就是装参数策略的这样一个容器
    private static final Map<String, ParameterTypeStragy> stragyMap=new ConcurrentHashMap<>();

    static {
        stragyMap.put("javaSingleType",new JavaTypeStragy());
        stragyMap.put("javax.servlet.http.HttpServletRequest",new HttpServletRequestStray());
        stragyMap.put("javax.servlet.http.HttpServletResponse",new HttpServletResponseStray());
        stragyMap.put("com.qfoud.edu.framwork.pojo.Model",new ModelStray());
        stragyMap.put("java.lang.String[]",new StringArrayStragy());
    }

    public static Map<String, ParameterTypeStragy> getStragyMap() {
        return stragyMap;
    }
}
